Enable test when building
authorShengjing Zhu <zhsj@debian.org>
Sat, 6 Mar 2021 09:56:19 +0000 (17:56 +0800)
committerShengjing Zhu <zhsj@debian.org>
Sat, 6 Mar 2021 10:04:21 +0000 (18:04 +0800)
debian/control
debian/patches/0005-Use-system-googletest.patch [new file with mode: 0644]
debian/patches/no-remote-images-when-reading-docs-on-disk.patch
debian/patches/series
debian/rules

index 2eadce4263b7d35a3b07b70889f6820b028287fa..834dae061565059c0a1f49fb7ceef4ad712eee02 100644 (file)
@@ -13,6 +13,7 @@ Build-Depends:
  darts,
  debhelper-compat (= 13),
  doxygen <!nodoc>,
+ googletest <!nocheck>,
  libmarisa-dev,
  libtclap-dev,
  python3:any,
diff --git a/debian/patches/0005-Use-system-googletest.patch b/debian/patches/0005-Use-system-googletest.patch
new file mode 100644 (file)
index 0000000..783d6bb
--- /dev/null
@@ -0,0 +1,22 @@
+From: Shengjing Zhu <zhsj@debian.org>
+Date: Sat, 6 Mar 2021 17:53:25 +0800
+Subject: Use system googletest
+
+Forwarded: not-needed
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index efb51ae..e26b934 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -195,7 +195,7 @@ add_subdirectory(test)
+ ######## Testing
+ if (ENABLE_GTEST)
+-  add_subdirectory(deps/gtest-1.11.0)
++  add_subdirectory(/usr/src/googletest/googletest ${CMAKE_BINARY_DIR}/googletest-build EXCLUDE_FROM_ALL)
+   enable_testing()
+ endif()
index 3ea24ee0e5eeb4b36dddd14aa25ace6e0d4ee627..60b1bbc7a20a3a1efbf13e198c3a07ff5a8ba15c 100644 (file)
@@ -1,9 +1,17 @@
-Description: Don't fetch remote images when reading docs on disk
- This fixes a privacy breach previously reported as Lintian warnings
-Author: Gunnar Hjalmarsson <gunnarhj@ubuntu.com>
+From: Gunnar Hjalmarsson <gunnarhj@ubuntu.com>
+Date: Sat, 6 Mar 2021 17:45:20 +0800
+Subject: Don't fetch remote images when reading docs on disk
+
 Forwarded: no
 Last-Update: 2021-01-14
 
+This fixes a privacy breach previously reported as Lintian warnings
+---
+ README.md | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/README.md b/README.md
+index d941d6b..0663dcd 100644
 --- a/README.md
 +++ b/README.md
 @@ -1,12 +1,12 @@
index 74933a61d638a0bcebafa6bfe9c978af6d2d1eeb..35f486253656e5827ffae932b8e36466492f308e 100644 (file)
@@ -2,3 +2,4 @@ use-cmake-install-libdir.patch
 0003-use-system-libraries.patch
 0003-data-Explicitly-use-python3.patch
 no-remote-images-when-reading-docs-on-disk.patch
+0005-Use-system-googletest.patch
index e4cc9c48e7dd5f14ef1a3f771705bbe654753f63..250a00705b06bf8a17a01eea168ffd3573f9d3ea 100755 (executable)
@@ -25,6 +25,11 @@ else
 BUILD_OPTIONS += -DBUILD_DOCUMENTATION=OFF
 endif
 
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+BUILD_OPTIONS += -DENABLE_GTEST=ON
+else
+BUILD_OPTIONS += -DENABLE_GTEST=OFF
+endif
 
 override_dh_auto_configure:
        dh_auto_configure -- $(BUILD_OPTIONS)